package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * The persistent class for the month_salary database table.
 */
@Entity
@Table(name = "month_salary")
@NamedQueries({
        @NamedQuery(name = "MonthSalary.findAll", query = "SELECT m FROM MonthSalary m"),
        @NamedQuery(name = "MonthSalary.findById", query = "SELECT m FROM MonthSalary m WHERE m.id = :id"),
        @NamedQuery(name = "MonthSalary.findBySalary", query = "SELECT m FROM MonthSalary m WHERE m.salary = :salary"),
        @NamedQuery(name = "MonthSalary.findByWorkTime", query = "SELECT m FROM MonthSalary m WHERE m.workTime = :workTime"),
        @NamedQuery(name = "MonthSalary.findByOvertime", query = "SELECT m FROM MonthSalary m WHERE m.overtime = :overtime"),
        @NamedQuery(name = "MonthSalary.findByOvertimeSat", query = "SELECT m FROM MonthSalary m WHERE m.overtimeSat = :overtimeSat"),
        @NamedQuery(name = "MonthSalary.findByOvertimeSun", query = "SELECT m FROM MonthSalary m WHERE m.overtimeSun = :overtimeSun"),
        @NamedQuery(name = "MonthSalary.findByOvertimeHol", query = "SELECT m FROM MonthSalary m WHERE m.overtimeHol = :overtimeHol")})
public class MonthSalary implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    private int overtime;

    @Column(name = "overtime_hol")
    private int overtimeHol;

    @Column(name = "overtime_sat")
    private int overtimeSat;

    @Column(name = "overtime_sun")
    private int overtimeSun;

    @Column(nullable = false, precision = 10, scale = 2)
    private BigDecimal salary;

    @Column(name = "work_time", nullable = false)
    private int workTime;

    // bi-directional many-to-one association to Employee
    @ManyToOne
    @JoinColumn(name = "id_employee", nullable = false)
    private Employee employee;

    public MonthSalary() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getOvertime() {
        return this.overtime;
    }

    public void setOvertime(int overtime) {
        this.overtime = overtime;
    }

    public int getOvertimeHol() {
        return this.overtimeHol;
    }

    public void setOvertimeHol(int overtimeHol) {
        this.overtimeHol = overtimeHol;
    }

    public int getOvertimeSat() {
        return this.overtimeSat;
    }

    public void setOvertimeSat(int overtimeSat) {
        this.overtimeSat = overtimeSat;
    }

    public int getOvertimeSun() {
        return this.overtimeSun;
    }

    public void setOvertimeSun(int overtimeSun) {
        this.overtimeSun = overtimeSun;
    }

    public BigDecimal getSalary() {
        return this.salary;
    }

    public void setSalary(BigDecimal salary) {
        this.salary = salary;
    }

    public int getWorkTime() {
        return this.workTime;
    }

    public void setWorkTime(int workTime) {
        this.workTime = workTime;
    }

    public Employee getEmployee() {
        return this.employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

}